package com.duyj.server.account.controller;

import com.duyj.client.account.feign.AccountFeignService;
import com.duyj.client.account.model.Account;
import com.duyj.server.account.service.AccountService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AccountController implements AccountFeignService {

    Logger logger = LoggerFactory.getLogger(AccountController.class);

    @Autowired
    private AccountService accountService;

    @Override
    public void updateAccount(Account account) {
        logger.info("account:" + account);
        accountService.updateAccount(account);
    }

    @Override
    public void putAccount(String name) {
        logger.info("name:" + name);
        accountService.putAccount(name);
    }
}
